package com.tangk;

import java.util.Map;
import java.util.logging.Logger;

import com.tangk.tool.ITools;
import com.tangk.tool.ToolsFactory;
import com.tangk.tool.author.core.Config;
import com.tangk.tool.util.Constans;

public class Main {
	static Logger logger = Logger.getLogger("Main");
	public static void main(String[] args) {
		String[] params = {"",Constans.defaultConfigTools,Constans.authTools};
		CMD(params,params.length - 1);
	}

	private static void CMD(String[] args,int index) {
		String key = Config.get(args[index], Constans.defaultConfigTools);
		logger.info("使用的工具Key为"+key);
		ITools tools = ToolsFactory.creater(key);
		Map<String,Object> rstMap = tools.doIt(null);
		tools.end();
		System.out.println(rstMap.get("value"));
	}
	
}
